<html>
    <head>
        <script type="text/javascript" src="/jquery.js"></script>
        <script type="text/javascript">
            function showMsg(e) {
                    $(e.target).attr('disabled', true);
                    if ($('#msg').html().length == 0) {
                        $('#msg').html('<h1>Hello</h1>');
                        }
                        $('div#msg').show();
                        setTimeout(function(){
                            $('div#msg').hide();
                            $(e.target).attr('disabled', false);
                        }, 3000);
                    }
            $(document).ready(function(e) {
                    $('div#msg').hide()
                    $('#btn').click(showMsg);
            });

        </script>
    </head>
    <body>
        <div id="msg" ><h1>Hello World</h1></div>
        <input type="button" value="Click Me" id="btn"/>

    </body>
</html>

                                                                                                                        $(document).ready(function(e){
                                                                                                                                      $('#btn').click(showMsg);
                                                                                                                                            });

